;
define(function (required, exports, modules) {
    var modal = require('mods/modal')
    exports.notice_del = function () {
        $('.notice_del').click(function () {
            var notice_id = $(this).attr('data-id')
            var _csrf = $('#csrf').val()

            modal.confirm('确定要删除此通告吗?', {}, function () {
                $.ajax({
                    url: "/admin/notice/ops",
                    type: 'POST',
                    dataType: 'json',
                    data: {
                        notice_id: notice_id,
                        _csrf: _csrf,
                    },
                    success: function (res) {
                        if (res.code == 200) {
                            modal.msg(res.msg, {}, function () {
                                window.location.reload()
                            });
                        } else {
                            modal.alert(res.msg)
                            return false
                        }
                    }
                })
            }, function () {
            })
        })
    }
})